//
// Created by maohuan on 2022/11/21.
//

#ifndef UNTITLED_IMODEL_H
#define UNTITLED_IMODEL_H

#include <vector>
#include <string>
#include <functional>

typedef enum _ReqCmd : char
{
    REQ_GET = 0,
    REQ_PUT,
    REQ_POST,
    REQ_DELETE
}ReqCmd;

class result {
public:
	result() {
		code = 0;
		msg = "";
		str = "";
		type = 0;
		payload = "";
	}
	int code;
	std::string	msg;
	std::string str;
	int type;
	std::string payload;
};

template<typename T>
using FunctionPtr = void (T::*)(result* res);

class IModel
{
public:
    virtual ~IModel();
    virtual void update(const std::vector<std::string> &path, void* user) = 0;


protected:
    IModel();
};

#endif //UNTITLED_IMODEL_H
